Release 10.1A: OpenEdge Development:
Java Open Clients
Defining the schema for temp-tables in a ProDataSet
Defining the schema for a temp-table (
Note: This is a condensed description with reference to the Java OpenAPI. For complete information on defining the schema temp-tables in a ProDataSet parameter, see Chapter 5, " Accessing Progress ProDataSets."ProDataObjectcollection) in a ProDataSet is a multi-step process.
![]()
To define the schema for a temp-table in a ProDataSet:
Defining a ProDataObjectMetaData object
For each table (
ProDataObjectcollection) contained within aProDataGraph, you must define acom.progress.open4gl.ProDataObjectMetaDataobject to hold the schema using the following constructor:
tableNameSpecifies a name for the specified
ProDataObjecttype (and collection). This name is typically identical to any 4GL temp-table to which this collection is mapped.numFieldsSpecifies the number of fields (column properties) in the specified
ProDataObjecttype.bimageFlagSpecifies
trueif the corresponding Progress 4GL temp-table is defined with theBEFORE-TABLEoption, indicating that the temp-table (and hence theProDataObjectcollection) can be modified. Otherwise, this value must befalseand you cannot pass modified data between the Open Client and the AppServer.numIndexesSpecifies the number of indexes on the table.
multiIxColsSpecifies
nullif there are no indexes or a formatted string that contains all the index info for this temp-table, as follows:
For more information on this formatted string, see the section on the
ProDataObjectMetaData()constructor in Chapter 5, " Accessing Progress ProDataSets."XMLNamespaceSpecifies the namespace for XML serialization or
null.XMLPrefixSpecifies the prefix for XML serialization or
null.Adding field descriptions to the ProDataObjectMetaData object
For each field (
ProDataObjectcolumn property) in the temp-table, add its meta data by calling thesetFieldMetaData()method on theProDataObjectMetaDataobject:
fieldNumberSpecifies a 1-based position that corresponds to the position of a mapped field in a Progress 4GL temp-table.
fieldNameSpecifies a name that is typically identical to a mapped field in the corresponding 4GL temp-table. The value cannot be
nulland must be unique among fields (column properties) in the specifiedProDataObjecttype.extentValueSpecifies if and how the field represents an array field in the corresponding temp-table. The value must be 0 or greater. If the value is greater than 1, this column property is many-valued (represents an array field) and the value is its extent. If the property represents a
BLOBorCLOBfield, the value must be 0 or 1.proTypeSpecifies the value of a class constant defined in the
com.progress.open4gl.Parameterclass. The specified class constant indicates the 4GL data type of the mapped temp-table field. For more information on these class constants, see the sections on specifying field data type meta data for temp-tables in Chapter 4, " Passing Parameters." To identify the Java data type that the column property assumes for the specified 4GL data type, see the information on managingProDataObjectmappings to temp-tables in Chapter 5, " Accessing Progress ProDataSets."userOrderSpecifies a 0-based user order position for the column property.
xmlMappingReserved for future use. Always specify 0.
Adding the ProDataObjectMetaData object to the ProDataGraphMetaData
Add the
ProDataObjectMetaDataobject to theProDataGraphMetaDatausing the followingProDataGraphMetaDataobject method:
doMetaDataSpecifies the
ProDataObjectMetaDatafor one temp-table in the ProDataSet parameter.This is an example that adds a temp-table parameter defined with no indexes:
For more information on the objects and methods for defining the schema (meta data) of temp-tables in a
ProDataGraph, see Chapter 5, " Accessing Progress ProDataSets."
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |